//
//  WYMoneyCell.m
//  Boss
//
//  Created by admin on 2018/7/2.
//  Copyright © 2018年 admin. All rights reserved.
//

#import "WYMoneyCell.h"
@interface WYMoneyCell()
@property (strong, nonatomic) IBOutlet UILabel *commentLabel;
@property (strong, nonatomic) IBOutlet UILabel *timeLabel;
@property (strong, nonatomic) IBOutlet UILabel *priceLabel;
@property (strong, nonatomic) IBOutlet UILabel *blanceLabel;
@property (strong, nonatomic) IBOutlet NSLayoutConstraint *lineHeight;


@end
@implementation WYMoneyCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.lineHeight.constant = kLineHeight;
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setDetail:(WYWalletDetail *)detail
{
    _detail = detail;
    
    if ([detail.inOutType isEqualToString:@"1"]) {
        self.priceLabel.text = [NSString stringWithFormat:@"+%.3f",detail.amount.floatValue/1000.0];
    }else{
        self.priceLabel.text = [NSString stringWithFormat:@"-%.3f",detail.amount.floatValue/1000.0];
    }
    self.commentLabel.text = detail.comment;
    self.timeLabel.text = [NSString compareTimeWithBossTime:detail.createTime];
    
    
}





@end
